package studenttest.experiment1;

import java.util.Scanner;

import org.junit.Test;

public class Dicidenewvirus {

	public static Scanner sc=new Scanner(System.in);

	static int symptom() {
		
		System.out.println("判断症状:有症状选输入1 ，无症状选输入0");
		int resultsym = 0;
		resultsym = sc.nextInt();
		if (resultsym == 1) {
			System.out.println("发热、咽喉痛、咳嗽、鼻塞、流鼻涕、胸闷、气急、呼吸困难、全身酸痛、乏力、腹泻、");
		} else {
			//sc.close();
			return 0;
		}
		//sc.close();
		return 1;
	}

	static int time() {
		//Scanner sc = new Scanner(System.in);
		System.out.println("本次不舒服有多久了？	14天以内输入1 ，14天以上输入2");
		int resulttime = 0;
		resulttime = sc.nextInt();
		if (resulttime == 1) {
			//sc1.close();
			return 1;
		}
		//sc1.close();
		return 2;
	}

	static int contacthistory() {
		//Scanner sc = new Scanner(System.in);
		System.out.println(
				"有无接触史 ：有武汉（湖北）等疫区旅游史或居住史/有接触过来自武汉（湖北）等疫区人员/有接触过疑似或确诊新型冠状病毒感染者/身边有多人出现发热、乏力、咳嗽、咽痛等   输入1 ， 无接触史输入 0");
		int result = 0;
		result = sc.nextInt();
		if (result == 1) {
		//	sc.close();
			return 1;
		} else {
		//	sc.close();
			return 0;
		}
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int symptom1; // 症状
		int time1; // 生病时长
		int contacthistory1; // 接触史
		// symptom();
		// time();
		
		symptom1 =symptom();
		if (symptom1 ==1) {
			time1 =time();
		} else {
			
		}
		contacthistory1 = contacthistory();
	
		sc.close();
		if (symptom1 ==1 && contacthistory1 ==1) 
			System.out.println(1);
		if (symptom1 ==1 && contacthistory1 ==0)
			System.out.println(2);
		if (symptom1 ==0 && contacthistory1 ==1)
			System.out.println(3);
		if (symptom1 ==0 && contacthistory1 ==0)
			System.out.println(4);
	}

}
